package com.jwdf.uda.event;

import com.jwdf.uda.utils.EventBusUtil;

/**
 * 类说明：
 */
public class GuideTabCountEvent implements EventBusUtil.IEvent{
    private int guideId;
    private int type;//0评论数,1点赞数
    private int commentCount;
    private int likeCount;

    public GuideTabCountEvent(int guideId, int type) {
        this.guideId = guideId;
        this.type = type;
    }

    public int getGuideId() {
        return guideId;
    }

    public void setGuideId(int guideId) {
        this.guideId = guideId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(int commentCount) {
        this.commentCount = commentCount;
    }

    public int getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(int likeCount) {
        this.likeCount = likeCount;
    }

    public static GuideTabCountEvent newInstanceForComment(int guideId, int commentCount) {
        GuideTabCountEvent event = new GuideTabCountEvent(guideId, 0);
        event.setCommentCount(commentCount);
        return event;
    }

    public static GuideTabCountEvent newInstanceForLike(int guideId, int likeCount) {
        GuideTabCountEvent event = new GuideTabCountEvent(guideId, 1);
        event.setLikeCount(likeCount);
        return event;
    }

    public boolean isCommentType() {
        return type == 0;
    }

    public boolean isLikeType() {
        return type == 1;
    }


}
